/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package com.lostreseditores.logica;

import com.lostreseditores.modelo.CategoriaExamen;
import com.lostreseditores.persistencia.CategoriaExamenFacadeLocal;
import java.util.List;
import javax.ejb.EJB;
import javax.ejb.Stateless;

/**
 *
 * @author DILOVE
 */
@Stateless
public class CategoriaExamenLogica implements CategoriaExamenLogicaLocal {
    @EJB
    private CategoriaExamenFacadeLocal categoriaExamenDAO;
    
    @Override
    public void registrar(CategoriaExamen categoriaExamen) throws Exception {
        categoriaExamenDAO.create(categoriaExamen);
    }

    @Override
    public void modificar(CategoriaExamen categoriaExamen) throws Exception {
        categoriaExamenDAO.edit(categoriaExamen);
    }

    @Override
    public void eliminar(CategoriaExamen categoriaExamen) throws Exception {
        categoriaExamenDAO.remove(categoriaExamen);
    }

    @Override
    public CategoriaExamen consultarPorId(Integer idCategoriaExamen) throws Exception {
        return categoriaExamenDAO.find((Object)idCategoriaExamen);
    }

    @Override
    public List<CategoriaExamen> consultar() throws Exception {
        return categoriaExamenDAO.findAll();
    }

}
